<template>
  <div class="box">
    <el-form-item label="是否显示">
      <el-switch show-alpha v-model="series.label.show"> </el-switch>
    </el-form-item>
    <el-form-item label="位置">
      <el-select v-model="series.label.position">
        <el-option label="饼图扇区外侧" value="outside"></el-option>
        <el-option label="饼图扇区内部" value="inside"></el-option>
        <el-option label="饼图中心" value="center"></el-option>
      </el-select>
    </el-form-item>
    <el-form-item label="格式化">
      <el-input v-model="series.label.formatter"> </el-input>
    </el-form-item>
    <el-form-item label="文本颜色">
      <el-color-picker show-alpha v-model="series.label.color">
      </el-color-picker>
    </el-form-item>
    <el-form-item label="文本字号">
      <el-input-number
        v-model="series.label.fontSize"
        :max="99"
        :min="10"
        :step="1"
      >
      </el-input-number>
    </el-form-item>
    <div>标签视觉引导线样式</div>
    <div class="p1">
      <el-form-item label="显示">
        <el-switch show-alpha v-model="series.labelLine.show"> </el-switch>
      </el-form-item>
      <el-form-item label="线1">
        <el-input-number
          v-model="series.labelLine.length"
          :max="99"
          :min="0"
          :step="1"
        >
        </el-input-number>
      </el-form-item>
      <el-form-item label="线2">
        <el-input-number
          v-model="series.labelLine.length2"
          :max="99"
          :min="0"
          :step="1"
        >
        </el-input-number>
      </el-form-item>
      <el-form-item label="是否平滑">
        <el-switch show-alpha v-model="series.labelLine.smooth"> </el-switch>
      </el-form-item>
    </div>
  </div>
</template>

<script>
export default {
  name: "Label",
  inject: ["father"],
  computed: {
    series: {
      get() {
        return this.father.echartsOptions.series[0];
      },
      set(val) {
        this.father.echartsOptions.series[0] = val;
      },
    },
  },
  mounted() {},
  methods: {},
};
</script>

<style scoped>
</style>